cmake_minimum_required(VERSION 3.1)
project(chat)
#设置编译选项
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -g)

#按照std=c++11的标准编译

set(CMAKE_CXX_STANDARD 11)
# 配置最终的可执行文件输出的路径
# PROJECT_SOURCE_DIR工程的根目录
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#   配置头文件搜索路径
include_directories(${PROJECT_SOURCE_DIR} /include)
include_directories(${PROJECT_SOURCE_DIR} /include/json)
include_directories(${PROJECT_SOURCE_DIR} /include/server)
include_directories(${PROJECT_SOURCE_DIR} /include/server/dbfile)
include_directories(${PROJECT_SOURCE_DIR} /include/server/model)
include_directories(${PROJECT_SOURCE_DIR} /include/server/redis)
include_directories(${PROJECT_SOURCE_DIR} /thirdparty)
#配置库文件路径
link_directories(/usr/lib64/mysql)
#加载子目录
add_subdirectory(src)